package com.google.code.swingonfire.component.page;

import java.awt.AWTEvent;
import java.awt.Event;

public class JPageComponentSelectionEvent extends AWTEvent
{

    private static final long serialVersionUID = -7637959076569588247L;

    private final int componentIndex;
    private final boolean adjusting;

    public JPageComponentSelectionEvent(Event event, int componentIndex, boolean adjusting)
    {
        super(event);

        this.componentIndex = componentIndex;
        this.adjusting = adjusting;
    }

    public JPageComponentSelectionEvent(Object source, int id, int index, boolean adjusting)
    {
        super(source, id);

        componentIndex = index;
        this.adjusting = adjusting;
    }

    public int getComponentIndex()
    {
        return componentIndex;
    }

    public boolean isAdjusting()
    {
        return adjusting;
    }

}
